import * as React from "react";
import { observer } from "mobx-react";
import { Row, Col, Menu } from "antd";
import { WeaInputNumber, WeaCheckbox, WeaSelect , WeaLocaleProvider} from "ecCom";
import HuobiFormatterStore from "../FormatterSettingDialog";
const getLabel = WeaLocaleProvider.getLabel;
export interface IHuobiFormatter {
    store: HuobiFormatterStore;
}
@observer
export default class HuobiFormatter extends React.Component<IHuobiFormatter, {}> {
    render() {
        const { store } = this.props;
        const { specialSignType,specialUnitType, specialType,
         onClickSpecialType, selectSpecialType ='000000', onClickDwwyType,selectDwwyType, onClickZfhType,selectZfhType} = store;
        return (
            <div>
                
               
                <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@ffqx2g`} className="edcreport-formatter-common">
                    <label>{getLabel('526848','类型:') }</label>
                </Row>
                <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@5ftdep`} className="edcreport-formatter-common">
                    <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@k8pbtv`}>
                    <div className="edcreport-specialtype-list-wrapper">
                        <Menu ecId={`${this && this.props && this.props.ecId || ''}_Menu@sm9zq6`}
                            onClick={onClickSpecialType}
                            selectedKeys={[selectSpecialType]}
                        >
                            {specialType.map(menu => (
                                <Menu.Item ecId={`${this && this.props && this.props.ecId || ''}_undefined@3xezfq@${menu.key}`} key={menu.key} className="edc-report-valuetypeitem">
                                    <span>{menu.showname}</span>
                                </Menu.Item>
                            ))}
                        </Menu>
                    </div>
                    </Col>
                    { (selectSpecialType == 'dwwy') && <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@7q0iqz`}>
                    <div className="edcreport-specialtype-left-list-wrapper">
                        <Menu ecId={`${this && this.props && this.props.ecId || ''}_Menu@x8tqyb`}
                            onClick={onClickDwwyType}
                            selectedKeys={[selectDwwyType]}
                        >
                            {selectSpecialType == 'dwwy' && specialUnitType.map(menu => (
                                <Menu.Item ecId={`${this && this.props && this.props.ecId || ''}_undefined@3d844i@${menu.key}`} key={menu.key} className="edc-report-valuetypeitem">
                                    <span>{menu.showname}</span>
                                </Menu.Item>
                            ))}
                        </Menu>
                    </div>
                    </Col>}
                    { (selectSpecialType == 'zfh') && <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@jl5m0x`}>
                    <div className="edcreport-specialtype-left-list-wrapper">
                        <Menu ecId={`${this && this.props && this.props.ecId || ''}_Menu@tkenee`}
                            onClick={onClickZfhType}
                            selectedKeys={[selectZfhType]}
                        >
                            {selectSpecialType == 'zfh' && specialSignType.map(menu => (
                                <Menu.Item ecId={`${this && this.props && this.props.ecId || ''}_undefined@h9821l@${menu.key}`} key={menu.key} className="edc-report-valuetypeitem">
                                    <span>{menu.showname}</span><span className={menu.color == 'red' ? "edc-report-redFont" : ""}>{menu.showname2}</span>
                                </Menu.Item>
                            ))}
                        </Menu>
                    </div>
                    </Col>}
                    
                </Row>
            </div>
        );
    }
}